package cn.hanyx.consumer.service;


import cn.hanyx.consumer.bean.Depart;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.List;


/**
 * DepartService
 *
 * @author hanyx
 * @date 2019/07/10
 */
@FeignClient("hanyx-provider")
@RequestMapping("/provider/depart")
public interface DepartService {

    @PostMapping("/save")
    boolean saveDepart(Depart depart);

    @DeleteMapping("/del/{id}")
    boolean removeDepartById(@PathVariable Integer id);

    @PutMapping("/update")
    boolean modifyDepart(Depart depart);

    @GetMapping("/get/{id}")
    Depart getDepartById(@PathVariable Integer id);

    @GetMapping("/list")
    List<Depart> listAllDeparts();


}
